package com.application;

import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.application.base.BaseActivity;
import com.application.bean.Student;
import com.application.databinding.ActivitySqliteUpdateBinding;
import com.application.util.ARouterConstants;
import com.application.util.MySQLiteOpenHelper;
import com.application.viewmodel.SQLiteUpdateViewModel;

@Route(path = ARouterConstants.ACTIVITY_URL_SQLITE_UPDATE)
public class SQLiteUpdateActivity extends BaseActivity<ActivitySqliteUpdateBinding, SQLiteUpdateViewModel> {

    @Override
    protected int initLayoutId() {
        return R.layout.activity_sqlite_update;
    }

    @Override
    protected int initVariableId() {
        return BR.sqliteUpdateViewModel;
    }

    @Override
    protected void initData() {
        super.initData();
        viewModel.initDbHelper(this);
        binding.setActivity(this);
    }

    public void update(View view) {
        viewModel.updateData(this);
    }

}